<div id="post_<%= post.id %>" class="post">
	<h2><%= link_to post.title, :action => :view, :id => post %></h2>
	
	<%= post.formatted_text %>
	
	<div id="post_controls_<%= post.id %>" class="post_controls">
		Posted <%= time_ago_in_words post.created_on %> ago
		<% if session[:user] -%>
		<%= link_to_remote "edit",
			{
				:loading => "$('show_edit_indicator_#{post.id}').show()",
				:complete => "$('show_edit_indicator_#{post.id}').hide()",
				:url => { :action => :remote_show_edit, :id => post }
			},
			{
				:href => url_for(:action => :edit, :id => post)
			}
		%>
		<%= image_tag 'spinner.gif', :size => '16x16', :alt => "Please wait...", :style => 'display: none', :id => "show_edit_indicator_#{post.id}", :class => 'middle' %>
		<% end -%>
	</div>
</div>
